<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //窗口大小事件 
        //window.innerWidth   获取浏览器窗口的宽度大小
         //window.innerHeight   获取浏览器窗口高度的大小
        window.addEventListener("resize", function(){
            console.log(window.innerWidth );
            console.log(window.innerHeight);
          
        })
    </script>
</body>
</html>